package com.salt.core.redis.properties;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @Description
 * @Author salt
 * @Date 2023/6/27
 * @Version 1.0.1
 */
@Data
@Component
@ConfigurationProperties(prefix = "spring.redis")
public class SaltRedisProperties {

    private int database;
    private String host;
    private String password;
    private int port;
    private long timeout;  // 连接超时时间
    private SaltLettuceProperties saltLettuceProperties;

    public SaltRedisProperties (SaltLettuceProperties saltLettuceProperties) {
        this.saltLettuceProperties = saltLettuceProperties;
    }

}
